package com.yyang.pai.mvp.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

import javax.inject.Inject;

/**
 * @author yyang
 * @date 2019/3/18
 */
public class HomePageAdapter extends FragmentPagerAdapter {
    @Inject
    FragmentManager mFragmentManager;
    private List<Fragment> mFragments;

    public HomePageAdapter(FragmentManager fm, List<Fragment> mFragments) {
        super(fm);
        mFragmentManager = fm;
        this.mFragments = mFragments;
    }


    @Override
    public Fragment getItem(int i) {
        return mFragments.get(i);
    }

    @Override
    public int getCount() {
        return mFragments.size();
    }
}
